package com.block.datapush.common.model.result;

import com.block.datapush.common.enums.FilterErrorEnum;
import lombok.Data;

@Data
public class FilterHandlerResult {

    public boolean success;

    public FilterErrorEnum result;

    public String message;

    public static FilterHandlerResult success(){
        FilterHandlerResult handlerResult = new FilterHandlerResult();
        handlerResult.setSuccess(true);
        return handlerResult;
    }

    public static FilterHandlerResult error(FilterErrorEnum result, String message){
        FilterHandlerResult handlerResult = new FilterHandlerResult();
        handlerResult.setSuccess(false);
        handlerResult.setResult(result);
        handlerResult.setMessage(message);
        return handlerResult;
    }

}
